// 视频布局样式
.real-video {
	position: relative;
	display: grid;
	width: 100vw;
	height: 100%;
	padding: 24px 16px;
	grid-template-rows: minmax(0, 1fr);
	grid-column-gap: 8px;

	:deep(.ant-checkbox-inner) {
		border-color: @primary01;
		border-radius: 4px !important;
		background-color: @mask02;
	}

	:deep(.ant-checkbox-wrapper-checked) .ant-checkbox-inner {
		background-color: rgba(68, 188, 213, 1) !important;
	}

	:deep(.ant-checkbox-wrapper-checked):hover .ant-checkbox-inner {
		background-color: rgba(68, 188, 213, 1) !important;
	}

	:deep(.ant-checkbox-wrapper-checked):hover .ant-checkbox::after {
		border-color: rgba(68, 188, 213, 1) !important;
	}

	.devices-arrow {
		position: absolute;
		top: 50%;
		left: 2px;
		z-index: 10;
		display: flex;
		// display: none;
		width: 14px;
		height: 40px;
		border: 1px solid rgba(255, 255, 255, 0.2);
		// border-radius: 4px 0 0 4px;
		background: rgba(255, 255, 255, 0.2);
		transform: translateY(-50%);
		cursor: pointer;
		justify-content: center;
		align-items: center;
	}

	.devices {
		position: relative;
		width: 100%;
		height: 100%;
		// background: url('../../../../global-assets/imgs/devices-bg.png') no-repeat center bottom;
		// background-size: 100% 100%;

		.devices-title {
			position: relative;
			margin-bottom: 22px;

			img {
				position: absolute;
				top: 0;
				left: 0;
				z-index: 1;
				width: 100%;
			}

			p {
				position: relative;
				z-index: 2;
				padding: 10px 12px;
				font-family: Noto Sans SC;
				font-size: 16px;
				font-weight: 700;
				line-height: 24px;
				text-align: left;
				letter-spacing: 0;
				color: @text01;
			}
		}

		.devices-btm {
			position: absolute;
			bottom: 0;
			left: 0;
			z-index: 1;
			width: 100%;
			height: 40px;
			background: url('@/global-assets/imgs/devices-btm.png') no-repeat center bottom;
			background-size: 100% 40px;

			div {
				position: absolute;
				bottom: 0;
				left: 0;
				z-index: 2;
				width: 100%;
				height: 40px;
				border: 1px solid #20305b;
				border-top: 0;
				border-bottom-right-radius: 8px;
				border-bottom-left-radius: 8px;
				font-size: 14px;
				line-height: 40px;
				color: @text02;
			}

			button {
				margin: 0 5px 0 8px;
				transform: scale(0.6, 0.65);
			}
		}
	}

	.alarm-record {
		border: 1px solid @borderColor01;
		border-radius: 8px;
		background-color: @background01;

		.alarm-check {
			width: 120px;
			height: 24px;
			border: 1px solid rgba(255, 255, 255, 0.1);
			border-radius: 100px;
			padding: 0 10px;
			font-size: 14px;
			font-weight: 400;
			line-height: 22px;
			text-align: center;
			color: @text03;

			> span {
				margin-left: 6px;
			}
		}
	}

	.video-control-icon {
		color: #8b949e;

		&:hover {
			color: @text01;
		}

		&:active {
			color: @text01;
		}
	}

	.screen-btn-active {
		background: rgba(255, 255, 255, 0.15);

		&:hover {
			background: rgba(255, 255, 255, 0.15);
		}

		.video-control-icon {
			color: @text01;
		}
	}

	.discern-switch {
		display: flex;

		span {
			margin-left: 10px;
			font-size: 14px;
			font-weight: 400;
			color: @text03;
		}
	}
}

.alarm-spin {
	overflow: hidden;
	width: 100%;
	height: 100%;

	:deep(.ant-spin-container) {
		overflow: hidden;
		width: 100%;
		height: 100%;
	}
}

.fullscreen {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

// 中间视频
.monitor-video-center {
	overflow: hidden;
	border: 1px solid @borderColor01;
	border-radius: 8px;
	// padding: 0 6px;
	background: @mask02;
	box-shadow:
		0 20px 40px 0 rgba(0, 0, 0, 0.25),
		0 12px 12px 0 rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(40px);
}

//  视频操作条
.video-top-bar {
	display: flex;
	overflow: hidden;
	height: 48px;
	border-radius: 4px;
	padding: 0 16px;
	background: @background02;
	align-items: center;
	justify-content: space-between;

	> ul {
		display: flex;
		gap: 8px;
		align-items: center;

		> li {
			width: 30px;
			height: 30px;
			border: 0;
			border-radius: 6px;
			cursor: pointer;

			&:hover {
				background: rgba(255, 255, 255, 0.05);
			}

			&:active {
				background: rgba(255, 255, 255, 0.15);
			}
		}
	}

	.screen-all-btn {
		display: flex;
		min-width: 0;
		height: 100%;
		border: none;
		border-left: 1px solid @borderColor02;
		border-radius: 0;
		padding: 0;
		padding-left: 8px;
		background: transparent !important;
		align-items: center;
		gap: 8px;

		> div {
			width: 30px;
			height: 30px;
			border-radius: 6px;
			cursor: pointer;

			&:hover {
				background: rgba(255, 255, 255, 0.05);
			}

			&:active {
				background: rgba(255, 255, 255, 0.15);
			}
		}
	}
}

// 未选择视频样式
.video-empty {
	display: flex;
	width: 100%;
	height: 100%;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, #0d1c3a 0%, #051020 100%);

	.empty-image {
		position: relative;

		.empty-description {
			position: absolute;
			top: calc(50% + 20px) !important;
			left: calc(50% - 25px);
			min-width: 60px;
			font-size: 14px;
			font-weight: 400;
			line-height: 22px;
			text-align: center;
			color: @text02;
		}
	}
}

// 视频播放内容盒子布局样式
.video-content-box {
	width: 100%;
	padding: 6px;

	.video-content-grid {
		display: flex;
		width: 100%;
		height: 100%;
		flex-wrap: wrap;
		align-content: flex-start;
		gap: 2px;

		.operation-button {
			position: absolute;
			top: 0;
			right: 0;
			z-index: 9;
			display: none;
			// width: 112px;
			height: 46px;
			border-radius: 0 0 0 6px;
			background-color: black;
			gap: 0 6px;
			align-items: center;

			.button-item {
				width: 56px;
				height: 28px;
				line-height: 28px;
				text-align: center;

				span {
					width: 24px;
					color: white;
				}

				&:first-child {
					border-right: 1px solid @mask04;
				}

				&:hover {
					cursor: pointer;
				}
			}
		}

		.operation {
			position: relative;
			width: 100%;
			height: 100%;

			> div {
				position: absolute;
				top: 0;
				left: 0;
				z-index: 9;
				width: 100%;
				height: 100%;
				background-color: #d49c5e;
				opacity: 0.7;
			}
		}

		.operation-border {
			position: absolute;
			top: 0;
			width: 100%;
			height: 100%;
			border: 4px solid #f59700;
		}

		.operation-time {
			position: absolute;
			top: 4px;
			left: 8px;
			z-index: 9;
			color: @white;
		}

		.operation-location {
			position: absolute;
			bottom: 10px;
			left: 10px;
			z-index: 9;
			display: flex;
			width: 100%;
			padding-right: 20px;
			font-size: 12px;
			font-weight: 700;
			line-height: 20px;
			color: white;
			text-shadow: 0 0 1.5px rgba(37, 37, 45, 0.8);
			align-items: center;
			justify-content: space-between;

			.location-locationName {
				max-width: 202px;
				margin-bottom: 2px;
			}

			.location-deviceName {
				max-width: 130px;
			}
		}

		.operation-aiDevice {
			position: absolute;
			right: 8px;
			bottom: 8px;
			z-index: 1;
			width: 48px;
			height: 17px;
			border: 1px solid rgba(255, 255, 255, 0.8);
			border-radius: 6px;
			line-height: 13px;
			text-align: center;
			color: #0d4cca;
			background: rgba(151, 188, 247, 0.8);
			box-shadow: @shadowS;
			// .ellipsis();

			&:hover {
				background: #97bcf7;
				box-shadow: @shadowM;
				cursor: pointer;
			}

			.title-type-text {
				margin-right: 4px;
				font-size: 12px;
				font-weight: 700;
			}

			.title-type-number {
				font-size: 12px;
				font-weight: 700;
				color: white;
			}
		}

		.operation-empty {
			background: rgba(176, 176, 176, 0.8);
			box-shadow: @shadowS;

			& > span {
				color: @text03;
			}

			&:hover {
				background: #b0b0b0;
				box-shadow: @shadowM;
			}
		}

		.video-item {
			width: 100%;
			height: 100%;
			object-fit: fill;
		}

		.video-item1 {
			position: relative;
			width: 100%;
			height: 100%;
			object-fit: fill;

			&:hover {
				border-radius: 4px;
				background: @mask01;

				.operation-button {
					display: flex;
				}
			}
		}

		.determine {
			border: 3px solid;
			border-image: linear-gradient(180deg, #ffd79d 0%, #be5a41 100%) 1;
		}

		.video-item4 {
			position: relative;
			width: calc(50% - 2px);
			height: 50%;
			border-radius: 4px;
			object-fit: fill;

			&:hover {
				border-radius: 4px;
				background: @mask01;

				.operation-button {
					display: flex;
				}
			}
		}

		.video-item9 {
			position: relative;
			overflow: hidden;
			width: calc(33.33% - 2px);
			height: 33.33%;
			object-fit: fill;

			// img {
			// 	position: relative;
			// 	top: -30px;
			// }

			.empty-description {
				top: calc(50% - 20px);
			}

			&:hover {
				border-radius: 4px;
				background: @mask01;

				.operation-button {
					display: flex;
				}
			}
		}
	}
}

// 全屏状态下 悬浮气泡按钮 样式
.screen-button {
	position: absolute;
	bottom: 40px;
	left: 50%;
	z-index: 999;
	display: flex;
	width: 176px;
	height: 64px;
	border-radius: 12px;
	background: rgba(16, 16, 20, 0.95);
	align-items: center;
	justify-content: center;

	.active {
		background-color: #1868e9 !important;
	}

	.button-item {
		width: 40px;
		height: 40px;
		margin-right: 8px;
		border-radius: 4px;
		line-height: 40px;
		text-align: center;

		i {
			font-size: 18px;
			color: white;
		}

		&:hover {
			background-color: @mask03;
			cursor: pointer;
		}
	}

	.button-item-open {
		box-sizing: border-box;
		width: 40px;
		height: 40px;
		border-left: 1px solid @mask04;
		padding: 0 8px;
		line-height: 40px;
		text-align: center;

		.open-content {
			width: 40px;
			border-radius: 4px;

			&:hover {
				background-color: @mask03;
				cursor: pointer;
			}
		}

		i {
			font-size: 18px;
			color: white;
		}
	}
}

// 智能巡检 --- 识别区域 切换按钮
.devices-btm,
.discern-switch {
	.ant-switch {
		background-color: @text03;
	}

	.ant-switch-checked {
		background-color: #46bfd8;

		&:hover {
			background-color: #46bfd8;
		}
	}
}

.devices {
	position: relative;

	&:hover .devices-arrow {
		display: flex;
	}
}
